package cz.possoft.client.dama.gui.panel;

import cz.possoft.client.gui.panel.GamePanel;
import cz.possoft.serializable.dama.game.DamaGame;
import cz.possoft.serializable.generic.Game;
import cz.possoft.serializable.generic.Location;

/**
 * Herni panel pro pro hru Dama
 * 
 * @author mara
 */
public class DamaPanel extends GamePanel {		
	
    /** Creates a new instance of DamaPanel */
    public DamaPanel() {    	
    }
    
    // inicializuje komponenty, ktere by mely byt specificke pro tuto hru.    
    protected void initComponents() {
    	super.initComponents();
    }
    
    public String getDisplayName() {
    	return "Dama_todo";
    }
    
    // Tato metoda zavola setGame a pote provede nezbytne inicialni
    // kroky pri nasetovani teto hry (prekresleni panelu atd.)    
    public void setAndInitGame(Game gam) {    
    	super.setAndInitGame(gam);    	
        DamaGame game = (DamaGame)gam;                         
        setMarked(false);
        setMarkedFigurkaForPlay(new Location(-1, -1));
        setRingFigurka(new Location(-1, -1));
        getGamePane().setHraciPole(game.getHraciPole());    	
    }    
    
    // nastavi active u hry a provede pridruzene akce
    public void setActiveToGame(boolean active) {
        super.setActiveToGame(active);	
    }
    
    // prime odehrani tahu bez kontrol markupu a ringu atd. Tato metoda je volana
    // u aktivniho hrace i u protihrace (po tom co obdrzi muj tah ze serveru)    
    public void doPlay(int oldX, int oldY, int newX, int newY) {    
    	super.doPlay(oldX, oldY, newX, newY);
    }
        
}
